package net.libra.core
{
	import flash.events.EventDispatcher;
	import flash.events.IEventDispatcher;
	
	
	[Event(name="remove",type="base.ModelEvent")]
	
	[Event(name="update",type="base.ModelEvent")]
	
	[Event(name="updateFinish",type="base.ModelEvent")]
	
	public class BaseModel extends EventDispatcher
	{
		protected var modelName:String;
		public function BaseModel(modelName:String)
		{
			super();
			this.modelName = modelName;
		}
		public function getModelName():String
		{
			return modelName;
		}
		public function dispModelEvent(type:String,key:Object=null,oldValue:Object=null,newValue:Object=null):void
		{
			dispatchEvent(new ModelEvent(type,key,oldValue,newValue));
		}
		public function updateFinish():void
		{
			dispModelEvent(ModelEvent.UPDATE_FINISH);
		}
	}
}